package it.koutifaris.travianmap.db.operation.impl;

import it.koutifaris.travianmap.db.DomainUpdaterDAO;
import it.koutifaris.travianmap.db.operation.DomainOperation;
import it.koutifaris.travianmap.db.operation.DomainOperationFactory;
import it.koutifaris.travianmap.db.operation.OperationType;
import it.koutifaris.travianmap.model.Alliance;
import it.koutifaris.travianmap.model.Player;
import it.koutifaris.travianmap.model.Village;

public class OperationFactoryImpl implements DomainOperationFactory {

	private DomainUpdaterDAO updaterDAO;

	public OperationFactoryImpl(DomainUpdaterDAO updaterDAO) {
		this.updaterDAO = updaterDAO;
	}

	@Override
	public DomainOperation<Village> createOperation(OperationType type, Village village) {
		return new InsertOrUpdateVillage(getUpdaterDAO(), type, village);
	}

	@Override
	public DomainOperation<Player> createOperation(OperationType type, Player player) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public DomainOperation<Alliance> createOperation(OperationType type, Alliance alliance) {
		// TODO Auto-generated method stub
		return null;
	}

	protected DomainUpdaterDAO getUpdaterDAO() {
		return updaterDAO;
	}

}
